package xin.pms.repository;


import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
import xin.pms.enums.PermissionType;
import xin.pms.model.Permission;

import java.util.List;

/**
 * <pre>
 * Permission Repository
 * </pre>
 *
 * @author lixin_ma@outlook.com
 * @version 1.0
 * @since 2018/7/28 15:32
 */
@Repository
public interface PermissionRepository extends PagingAndSortingRepository<Permission, String>, JpaSpecificationExecutor<Permission> {

    List<Permission> findByPermissionType(PermissionType permissionType);

    List<Permission> findByPriorityGreaterThan(Integer priority);
}
